A good answer might be:

No. Often nothing changes.

Program's Output

The Java system automatically paints the frame when any of several things has happened:

However, a mere button click does not necessarily mean that a frame should be repainted. If it does (as it does in this program) call repaint() in the actionPerformed() method.

The picture shows the output of the program. The original frame is on the top. On the bottom is the frame after the button has been clicked. Additional clicks do nothing. Although the events are handled, all that happens is that the frame is set to blue each time. Clicking on the frame's "close window" button closes the frame.



QUESTION 15:

(Memory Test: ) What is the name of the method that receives ActionEvents when a Button is clicked?